
package com.shop.cloud.mall.api.controller;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shop.cloud.common.core.util.R;
import com.shop.cloud.mall.api.service.SignConfigService;
import com.shop.cloud.mall.common.entity.SignConfig;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

/**
 * 签到设置
 *
 * @author
 * @date 2021-01-13 14:30:42
 */
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping("/signconfig")
@Tag(description = "signconfig", name = "签到设置API")
public class SignConfigController {

    private final SignConfigService signConfigService;

    /**
     * 分页列表
     * @param page 分页对象
     * @param signConfig 签到设置
     * @return
     */
    @Operation(summary = "分页列表")
    @GetMapping("/page")
    public R getPage(Page page, SignConfig signConfig) {
        return R.ok(signConfigService.page(page, Wrappers.query(signConfig)));
    }

}
